package com.iweb.users.service;

import com.iweb.users.dao.UserDao;
import com.iweb.users.dao.UserDaoImpl;
import com.iweb.users.model.User;

import javax.servlet.http.HttpSession;

public class UserServiceImpl implements UserService{

    UserDao usersdao = new UserDaoImpl();
    @Override
    public boolean isLogin(String account, String password, HttpSession session) {
        User user = usersdao.queryByUsernamePassword(account, password);
        if(user != null){
            session.setAttribute("user",user);
            return true;
        }else {
            return false;
        }
    }
}
